#include "epollFunc.h"

int epollAdd(int epfd, int fd, int event){
    struct  epoll_event events;
    events.data.fd = fd;
    events.events = event;
    int ret = epoll_ctl(epfd, EPOLL_CTL_ADD, fd, &events);
    ERROR_CHECK(ret, -1, "epoll_ctl");
    return 0;
}
int epollDel(int epfd, int fd, int event){
    struct  epoll_event events;
    events.data.fd = fd;
    events.events = event;
    int ret = epoll_ctl(epfd, EPOLL_CTL_DEL, fd, &events);
    ERROR_CHECK(ret, -1, "epoll_ctl");
    return 0;
}